<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace Admin\Model;

use Think\Model;

class CouponsLeanCloudModel extends SyncModel {

    protected $tableName = "coupons";
    
    //leancloud表名
    protected $leancloudName = "Coupons";
    
    protected $_validate = array(
    );
    //映射的字段
    protected $_map = array('objectId' => 'id', 'createdAt' => 'createdate', 'updatedAt' => 'lastupdate');
    
    //leancloud 字段类型
    protected $leancloudelds = array(
        "objectId" => "String",
        "batchNo" => "String",
        "type" => "Number",
        "par" => "Number",
        "consume" => "Number",
        "reduce" => "Number",
        "cnt" => "Number",
        "validityStartPeriod" => "Date",
        "validityEndPeriod" => "Date",
        "receiveStartPeriod" => "Date",
        "receiveEndPeriod" => "Date",
        "receiveCondition" => "String",
        "useCondition" => "String",
        "createdAt" => "Date",
        "updatedAt" => "Date",
        "fileurl" => "String",
        "syncStatus" => "Number",
    );
    //配置字段
    protected $fields = array(
        'objectId',
        'batchNo',
        'type',
        'par',
        'consume',
        'reduce',
        'cnt',
        'validityStartPeriod',
        'validityEndPeriod',
        'receiveStartPeriod',
        'receiveEndPeriod',
        'receiveCondition',
        'useCondition',
        'createdAt',
        'updatedAt',
        'fileurl',
        'syncStatus',
        '_type' => array(
            'objectId' => 'int',
            'batchNo' => 'varchar',
            'type' => 'int',
            'par' => 'int',
            'consume' => 'int',
            'reduce' => 'int',
            'cnt' => 'int',
            'validityStartPeriod' => 'int',
            'validityEndPeriod' => 'int',
            'receiveStartPeriod' => 'int',
            'receiveEndPeriod' => 'int',
            'receiveCondition' => 'varchar',
            'useCondition' => 'varchar',
            'createdAt' => 'int',
            'updatedAt' => 'int',
            'fileurl' => 'varchar',
            'syncStatus' => 'int',
        )
    );

}